In recent years, music playing apparatuses that play a large amount of tune data recorded onto internal and external nonvolatile memories and miniature magnetic-storage devices have been on the market. The music playing apparatuses include portable players, mini-component stereo systems, and car audio systems. In general, these music playing apparatuses use audio coding techniques for compressing data while audio quality of sound sources practically remain unchanged in order to store the large amount of tune data in each limited storage area or improve transportability of tune data.
Furthermore, lossy compression methods are generally used for compression in the audio coding techniques, such as MPEG Audio Layer3 (MP3), Windows (trademark) Media Audio (WMA), and Advanced Audio Coding (AAC). Here, each of the sound sources is equivalent to data in a Pulse Code Modulation (PCM) format.
However, in the audio coding techniques, silent portions and transition portions (waveforms connected between sound source portions and silent portions) that are not included in the sound source as the characteristics of coding algorithms are added to one of a front end and a terminal end of each tune data or to both ends of each tune data during a process of coding (coding data in the PCM format, using the audio coding techniques) and decoding (decoding coded data into data in the PCM format to be played). A combination of the silent portion and the transition portion is referred to as a gap hereinafter. Furthermore, the vicinity of waveforms corresponding to front ends and terminal ends of each tune data have distortions. The distortions in the waveforms become more apparent, as absolute values of the front ends and the terminal ends of each tune data are larger. For example, sound sources of live music, classical music, eurobeat, and other genres of music have long duration, and are recorded onto recording media, such as CDs by dividing each of the sound sources into tracks. Thus, when the tracks are read from each of the CDs, and respectively coded and decoded to play the tracks in the same order as the original CDs, there is a problem that tracks between a plurality of tune data are added with gaps and have waveform distortions, and a user who listens to the music hears these gaps and waveform distortions as noise. Here, the gaps and waveform distortions are not included in the sound sources.
Thus, a music playing apparatus that enables “gapless play” has been desired. The gapless play is performed by dividing a sound source into portions, coding and decoding the portions respectively using the audio coding techniques, and continuously playing the decoded portions without having any uncomfortable feeling as solely playing the sound source.
The conventional technique of gapless play will be described with reference to FIG. 1. A track (N) 101 and a track (N+1) 102 are successive on a CD, and are obtained by dividing a sound source having no interval in between into tracks. Here, when the track (N) 101 and the track (N+1) 102 are respectively coded and decoded, each end of tune data is added with a gap 103 and has a waveform distortion 104. Thus, when a plurality of the decoded tune data are simply connected and the resultant data is played, the tune data has intervals that are not included in the sound source, and the user hears the intervals as noise with sound interruption and prolonged sound. Patent Reference 1 discloses a technique for removing silent portions by determining the continuity of tracks, as a method for solving this problem.    Patent Reference 1: Japanese Unexamined Patent Application Publication No. 2007-179604